//
//  CNAddressData.m
//  BeeQuick_19
//
//  Created by w on 16/9/24.
//  Copyright © 2016年 CN Team. All rights reserved.
//

#import "CNAddressData.h"

@implementation CNAddressData

+ (void)loadAdressData:(CompleteBlock)completion{
    //获取Bundle文件下的路径
    NSString *path = [[NSBundle mainBundle]pathForResource:@"MyAdressInfo" ofType:nil];
    //将文件转换成二进制
    NSLog(@"------------------%@---------------",path);
    NSData *data = [NSData dataWithContentsOfFile:path];
    //将字典进行转模型
    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
    //将转换后的数据保存给我自定义的AddressData中
    CNAddressData *addressData = [CNAddressData mj_objectWithKeyValues:dic];
        NSLog(@"------------------%@--------------------",addressData);
    //将数据进行回调
    completion(addressData.data,nil);
}
   //返回解析后的字典数组对应的CNAddressData数据
+(NSDictionary *)mj_objectClassInArray{
    return@{
            @"data" : NSStringFromClass([CNAddressData class])
            };
}

@end
@implementation Address

@end
